using System.Collections.Generic;
using Be.Timvw.Framework.ComponentModel;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Be.Timvw.Framework.ComponentModel
{
    [TestClass]
    public class WhenConstructingSortableBindingLists
    {
        [TestMethod]
        public void ShouldInitializeAndHaveZeroElements()
        {
            SortableBindingList<int> list = new SortableBindingList<int>();
            Assert.AreEqual(0, list.Count);
        }

        [TestMethod]
        public void ShouldCopyAllElementsFromList()
        {
            IList<Person> persons = SortableBindingListFactory.GetPersons();
            SortableBindingList<Person> list = new SortableBindingList<Person>(persons);
            Assert.AreEqual(persons.Count, list.Count);
        }
    }
}